package org.zhadoop.stream.cql.semanticanalyzer.parser.visitor;

import org.antlr.v4.runtime.misc.NotNull;
import org.zhadoop.stream.cql.semanticanalyzer.parser.CQLParser.ExpressionContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.WhereClauseContext;

/**
 * where 子句遍历
 * 
 * @author zwd
 *
 */
public class WhereClauseVisitor extends AbsCQLParserBaseVisitor<WhereClauseContext> {
	private WhereClauseContext context = null;

	public WhereClauseVisitor() {
		context = new WhereClauseContext();
	}

	@Override
	protected WhereClauseContext defaultResult() {
		return context;
	}

	@Override
	public WhereClauseContext visitExpression(@NotNull ExpressionContext ctx) {
		ExpressionVisitor visitor = new ExpressionVisitor();
		context.setExpression(visitor.visit(ctx));
		return context;
	}
}
